﻿<phone:PhoneApplicationPage
    x:Class="OsmerFvg.Views.RadarPageView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:imagetools="clr-namespace:ImageTools.Controls;assembly=ImageTools.Controls"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True">

    <phone:PhoneApplicationPage.Resources>
        <imagetools:ImageConverter x:Key="ImageConverter" />
    </phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid>

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="Radar" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" />
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid Grid.Row="1" Margin="12,6,12,0" Width="440">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="50*" />
                <ColumnDefinition Width="50*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="50*" />
                <RowDefinition Height="50*" />
            </Grid.RowDefinitions>

            <StackPanel Grid.Column="0" Grid.Row="0" Orientation="Vertical">
                <TextBlock Text="Riflettività" TextAlignment="Center"  />
                <imagetools:AnimatedImage Stretch="Uniform" Width="200" Height="220" Source="{Binding Path=RiflettivitaImageSource, Converter={StaticResource ImageConverter}}">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Tap">
                            <cal:ActionMessage MethodName="RiflettivitaTapCommand" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </imagetools:AnimatedImage>
                <imagetools:AnimatedImage Stretch="Uniform" Width="200" Height="18" Source="{Binding Path=ScalaZImageSource, Converter={StaticResource ImageConverter}}" />
            </StackPanel>

            <StackPanel Grid.Column="1" Grid.Row="0" Orientation="Vertical">
                <TextBlock Text="Precipitazione (Intensità)" TextAlignment="Center" />
                <imagetools:AnimatedImage Stretch="Uniform" Width="200" Height="220" Source="{Binding Path=PrecipitazioneImageSource, Converter={StaticResource ImageConverter}}" >
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Tap">
                            <cal:ActionMessage MethodName="PrecipitazioneTapCommand" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </imagetools:AnimatedImage>
                <imagetools:AnimatedImage Stretch="Uniform" Width="200" Height="18" Source="{Binding Path=ScalaRImageSource, Converter={StaticResource ImageConverter}}" />
            </StackPanel>

            <StackPanel Grid.Column="0" Grid.Row="1" Orientation="Vertical">
                <TextBlock Text="Precipitazione In 6 Ore" TextAlignment="Center"  />
                <imagetools:AnimatedImage Stretch="Uniform" Width="200" Height="220" Source="{Binding Path=PrecipitazioneIn6OreImageSource, Converter={StaticResource ImageConverter}}" >
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Tap">
                            <cal:ActionMessage MethodName="PrecipitazioneIn6OreTapCommand" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </imagetools:AnimatedImage>
                <imagetools:AnimatedImage Stretch="Uniform" Width="200" Height="18" Source="{Binding Path=ScalaRtImageSource, Converter={StaticResource ImageConverter}}" />
            </StackPanel>

            <StackPanel Grid.Column="1" Grid.Row="1" Orientation="Vertical">
                <TextBlock Text="Animazione" TextAlignment="Center"  />
                <imagetools:AnimatedImage Stretch="Uniform" Width="200" Height="220" Source="{Binding Path=AnimazioneImageSource, Converter={StaticResource ImageConverter}}">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Tap">
                            <cal:ActionMessage MethodName="AnimazioneTapCommand" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </imagetools:AnimatedImage>
                <imagetools:AnimatedImage Stretch="Uniform" Width="200" Height="18" Source="{Binding Path=ScalaZImageSource, Converter={StaticResource ImageConverter}}" />
            </StackPanel>
        </Grid>
    </Grid>


</phone:PhoneApplicationPage>